<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <title>添加学生</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.3.1/css/bootstrap.min.css">
</head>
<body>
<div class="container">
    <h1>学生管理系统</h1>
    <hr>
    <h2>保存学生信息</h2>

    <form action="#" th:action="@{/saveStudent}" th:object="${student}" method="POST">

        <input type="text" th:field="*{stuName}" placeholder="学生名字" class="form-control mb-4 col-4">

        <input type="text" th:field="*{stuId}" placeholder="学生ID" class="form-control mb-4 col-4">

        <input type="text" th:field="*{stuSex}" placeholder="学生性别" class="form-control mb-4 col-4">

        <input type="text" th:field="*{stuAge}" placeholder="学生年龄" class="form-control mb-4 col-4">

        <button type="submit" class="btn btn-success col-4"> 点击保存学生信息</button>
    </form>

    <hr>

    <a th:href="@{/}"> 返回学生的列表</a>
</div>
</body>

</html>